package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;


/**
 * 用户申请审批表
 * @author ZhuanZ（无密码）
 * @since 2025-01-15
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "ProcessApply", description = "用户申请审批表")
@TableName("fc_process_apply")
public class ProcessApply {

    /** 用户申请审批ID */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId
    private Long id;

    /** 表单收集ID */
    @NotNull(message = "表单收集ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "表单收集ID")
    @ApiModelProperty(value = "表单收集ID")
    private Long collectId;

    /** 申请自定义表单ID */
    @ExcelProperty(value = "申请自定义表单ID")
    @ApiModelProperty(value = "申请自定义表单ID")
    private String customFormId;

    /** 申请人用户ID */
    @NotNull(message = "申请人用户ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "申请人用户ID")
    @ApiModelProperty(value = "申请人用户ID")
    private Long applicantId;

    /** 申请人用户名称 */
    @NotBlank(message = "申请人用户名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "申请人用户名称")
    @ApiModelProperty(value = "申请人用户名称")
    private String applicantName;

    /** 流程应用ID */
    @NotNull(message = "流程应用ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "流程应用ID")
    @ApiModelProperty(value = "流程应用ID")
    private Long processId;

    /** 流程名称 */
    @NotBlank(message = "流程名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "流程名称")
    @ApiModelProperty(value = "流程名称")
    private String processName;

    /** 申请时间 */
    @NotNull(message = "申请时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "申请时间")
    @ApiModelProperty(value = "申请时间")
    private LocalDateTime applyTime;

    /** 审批结果(0-待审批 1-通过 9-拒绝) */
    @NotNull(message = "审批结果(0-待审批 1-通过 9-拒绝)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "审批结果(0-待审批 1-通过 9-拒绝)")
    @ApiModelProperty(value = "审批结果(0-待审批 1-通过 9-拒绝)")
    private Integer result;

    /** 状态 */
    @ExcelProperty(value = "状态")
    @ApiModelProperty(value = "状态")
    private String status;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 乐观锁 */
    @NotNull(message = "乐观锁不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    /** 创建人 */
    @ExcelProperty(value = "创建人")
    @ApiModelProperty(value = "创建人")
    private Long createBy;

    /** 更新人 */
    @ExcelProperty(value = "更新人")
    @ApiModelProperty(value = "更新人")
    private Long updateBy;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
